/*
 *
 * 
 * 自用模板引擎
 *
 * 
 */

function tempalte(id, data) {
	var ele = document.getElementById(id);
	var wen = ele.innerHTML;
	var reg = /{{(\w+)}}/;
	var str = reg.exec(wen);
	while (str) {
		wen = wen.replace(str[0], data[str[1]]);
		str = reg.exec(wen);
	}
	return wen;
}